Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks and improvements #2

Open
wants to merge 66 commits into
base: gh-pages
Choose a base branch
from
Open

Conversation

stormtek
Copy link

Added support for an array of values as well as a list of values to be sent to range()
Added support for a width parameter to be set on the input field
Improved handling of layout of slider options
Moved styling for slider to it's own stylesheet to make it easier to use in other projects
Improved readme documentation on how to use the slider

Elgar Storm and others added 5 commits June 13, 2013 16:33
Split css so that styling for the slider is in a separate file
Tweaked js to allow an array of options to be passed in if desired
Added support for a width value to be added to the input field
Improved layout of options
@jcemer
Copy link
Owner

jcemer commented Jun 19, 2013

Your examples are broken http://stormtek.github.io/zepto-range/

@stormtek
Copy link
Author

Broken in what way?

@jcemer
Copy link
Owner

jcemer commented Jun 19, 2013

image

@stormtek
Copy link
Author

it looks fine for me ...

@stormtek
Copy link
Author

zepto

@jcemer
Copy link
Owner

jcemer commented Jun 19, 2013

Try to open on chrome, firefox... I'm using Chrome Version 27.0.1453.110 on Mac.

@stormtek
Copy link
Author

im using ff on windows and it looks fine

@stormtek
Copy link
Author

It looks fine in Firefox on Ubuntu 12.10, Firefox on OSX, but you are right ... it breaks on chrome on both OSX and windows ...

@stormtek
Copy link
Author

So a styling issue with chrome? Does your original demo work on Chrome?

@stormtek
Copy link
Author

That is weird, I will look into it further. Cos that is a serious issue ...

@stormtek
Copy link
Author

Thanks for the heads up by the way :)

@Ruffio
Copy link

Ruffio commented Jun 19, 2013

also crome on android is brøken. it used to work.
Den 19/06/2013 07.33 skrev "stormtek" notifications@github.com:

So a styling issue with chrome? Does your original demo work on Chrome?


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-19663950
.

@stormtek
Copy link
Author

So it it a problem with chrome on almost all platforms ... it does work on firefox on all those platforms though

@stormtek
Copy link
Author

Looking at the generated html, the wrapper div being created has width being set to 0px when we are grabbing the width automatically rather than taking it from the input field value. So we are not getting the general width from the browser for some reason. That makes it a bug in the javascript. Hopefully that should not be too hard to fix.

@ricardobeat
Copy link

@stormtek you are trying to get this.input.attr('width') where it should be this.input.width(). That's one of the problems.

@stormtek
Copy link
Author

That is needed to allow the user to define the width of the slider in the input field. The problem is that if that is not specified then it is returning 0 in Chrome. I think I can fix it fairly easily by dropping to this.input.width() if we get 0 from the existing call.

@stormtek
Copy link
Author

How do I get that change back to the link we are looking at?

@stormtek
Copy link
Author

That does fix the problem when I run it locally in Chrome on my macbook though

@stormtek
Copy link
Author

Ok, may just need to wait a few minutes for testing live. But I do believe that is fixed now.

@stormtek
Copy link
Author

Yea, that is up and working in Chrome on both osx and windows.

@Ruffio
Copy link

Ruffio commented Jun 19, 2013

the test seams to work now in chrome om android. it is not supposed to fill
100% right?
Den 19/06/2013 08.01 skrev "stormtek" notifications@github.com:

Yea, that is up and working in Chrome on both osx and windows.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-19664614
.

@stormtek
Copy link
Author

If there is no wrapper div with a width specified and no width set on the input then it should fill 100%. I have updated the demo to show that with one of the sliders.

@Ruffio
Copy link

Ruffio commented Jun 19, 2013

beautiful :) you should check description for max parameter. and what does
inside do? missing a description?
Den 19/06/2013 11.26 skrev "stormtek" notifications@github.com:

If there is no wrapper div with a width specified and no width set on the
input then it should fill 100%. I have updated the demo to show that with
one of the sliders.


Reply to this email directly or view it on GitHubhttps://github.com//pull/2#issuecomment-19672053
.

@stormtek
Copy link
Author

I can now confirm that on Android touch is working well for my version in:

Chrome, Firefox, Opera Mobile, Dolphin, and the stock Internet browser

It is also behaving in Safari on the iOS simulator on my macbook. The slider also behaves in our native iOS app that uses phonegap.

Elgar Storm and others added 29 commits June 28, 2013 10:04
…uite as nice, now it seems to be behaving ...
… end. This allows us to then detect a click on the legend near either end of the slider and move it to the min or max value. This provides better usability for the slider.
…ce it has been created. Updated demo to show this in action.
We were having some weird scrolling when the element got focus that was fixed by changing this
showFill: allows a user to specify whether or not to show the fill
rtl: allows a user to specify whether or not to use an rtl layout on the fill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants